home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib6
/
v_08_11
/
8n11051a
< prev
next >
Wrap
Text File
|
1995-11-01
|
443b
|
17 lines
int msqid; /* Message queue identifier */
key_t key=0x1024; /* Name of message queue */
/* Obtain a message queue identifier. If the
* message queue doesn't exist, create it.
*/
if ((msqid=msgget(key, 0660 | IPC_CREAT)) == -1) {
/* The perror(3C) function prints the
* text of the error number contained
* in the external integer errno.
*/
perror("msgget() failed: ");
return(-1);
}